﻿Public Class FormSettings

    Private Sub FormSettings_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.ux_TextBoxGamerTag.Text = My.Settings.GamerTag
        Me.ux_TextBoxTwitterEmail.Text = My.Settings.TwitterEmail
        Me.ux_TextBoxTwitterPassword.Text = My.Settings.TwitterPassword
        Me.ux_TextBoxux_TextBoxTwitterUsername.Text = My.Settings.TwitterUsername
        Me.ux_NumericUpDownMinutesBetweenChecks.Value = My.Settings.MinutesBetweenChecks
        Me.ux_CheckBoxEnabled.Checked = My.Settings.Enabled
    End Sub

    Private Sub ux_ButtonOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ux_ButtonOK.Click
        My.Settings.GamerTag = Me.ux_TextBoxGamerTag.Text
        My.Settings.TwitterEmail = Me.ux_TextBoxTwitterEmail.Text
        My.Settings.TwitterPassword = Me.ux_TextBoxTwitterPassword.Text
        My.Settings.TwitterUsername = Me.ux_LabelTwitterUsername.Text
        My.Settings.MinutesBetweenChecks = Me.ux_NumericUpDownMinutesBetweenChecks.Value
        My.Settings.Enabled = Me.ux_CheckBoxEnabled.Checked
        My.Settings.Save()
        Me.Close()
    End Sub

    Private Sub ux_ButtonCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ux_ButtonCancel.Click
        Me.Close()
    End Sub

End Class